
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type UserRequest struct {

	Account string `json:"account" form:"account"`

	AddIp string `json:"add_ip" form:"add_ip"`

	Address string `json:"address" form:"address"`

	AdminId string `json:"admin_id" form:"admin_id"`

	Avatar string `json:"avatar" form:"avatar"`

	Birthday string `json:"birthday" form:"birthday"`

	BrokerageMoney string `json:"brokerage_money" form:"brokerage_money"`

	CardId string `json:"card_id" form:"card_id"`

	Exp string `json:"exp" form:"exp"`

	GroupId string `json:"group_id" form:"group_id"`

	Integral string `json:"integral" form:"integral"`

	InviteCode string `json:"invite_code" form:"invite_code"`

	IsDeliver string `json:"is_deliver" form:"is_deliver"`

	LastTime string `json:"last_time" form:"last_time"`

	Level string `json:"level" form:"level"`

	LoginType string `json:"login_type" form:"login_type"`

	Mark string `json:"mark" form:"mark"`

	Name string `json:"name" form:"name"`

	NickName string `json:"nick_name" form:"nick_name"`

	NowMoney string `json:"now_money" form:"now_money"`

	Password string `json:"password" form:"password"`

	PayCount string `json:"pay_count" form:"pay_count"`

	Phone string `json:"phone" form:"phone"`

	RealName string `json:"real_name" form:"real_name"`

	SignNum string `json:"sign_num" form:"sign_num"`

	StaffId string `json:"staff_id" form:"staff_id"`

	Status string `json:"status" form:"status"`

	UserType string `json:"user_type" form:"user_type"`

}

func (r *UserRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *UserRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"account": "string",

		"add_ip": "required",

		"address": "required",

		"admin_id": "",

		"avatar": "",

		"birthday": "",

		"brokerage_money": "",

		"card_id": "",

		"exp": "",

		"group_id": "",

		"integral": "",

		"invite_code": "",

		"is_deliver": "",

		"last_time": "",

		"level": "",

		"login_type": "",

		"mark": "",

		"name": "",

		"nick_name": "",

		"now_money": "",

		"password": "required",

		"pay_count": "",

		"phone": "required",

		"real_name": "",

		"sign_num": "",

		"staff_id": "",

		"status": "",

		"user_type": "required",

	}
}

func (r *UserRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
